<template>
  <nav-bar class="home" title="任务概况">
    <num-card :list="list" @cardclick="cardClick"/>
  </nav-bar>
</template>

<script>
export default {
  name: "Home",
  components: {
    'nav-bar': () => import('components/Container'),
    'num-card': () => import('components/NumCard')
  },
  data(){
    return {
      list: [{title: '未开始', value: 5}, {title:'进行中', value: 3},{title: '已完成',value:1000}]
    }
  },
  created() {
    this.$API.getList().then(res => {
      console.log(res);
    })
  },
  methods: {
    cardClick(e) {
      console.log(e);
    }
  }
};
</script>
